package com.rui.study.algorithm.T_字符串intern方法;

import com.rui.study.algorithm.PrintUtil;

/**
 * @program: study_20180824
 * @description: 字符串intern方法测试
 * @author: Yaowr
 * @create: 2018-09-03 08:37
 **/
public class 字符串的String方法 {

    public static void main(String[] args) {
        String str1 = new StringBuffer("计算机").append("软件").toString();
        PrintUtil.print(str1.intern() == str1);
        String str2 = new StringBuffer("ja").append("va").toString();
        PrintUtil.print(str2.intern() == str2);

    }
}
